import Mock from "mockjs";
import jwt from "jsonwebtoken"
// let token ="Bearer" + jwt.sign({foo:"bar"},"liu")
// console.log(token);

Mock.mock("/api/login", {
    code: 200,
    message:"登陆成功",
    token:200
})
Mock.mock("/api/swipers", {
    code: 200,
    "swipers|2": [{
        "id": "@id",
        "con|8": [{
            "id": "@id",
            "title": "@ctitle(4)",
            "img": "@image(80x80,@color)"
        }]
    }]
})

Mock.mock("/api/list", {
    code: 200,
    "list|10-16": [{
        "id": "@id",
        "title": "@ctitle(5,9)",
        "img": "@image(80x80,@color)",
        "comment|1-1000": 1,
        "price|1-1000": 1,
    }]
})

Mock.mock("/api/classify", {
    code: 200,
    "classify|8": [{
        "id": "@id",
        "name": "@cword(2,4)",
        "info|10-16": [{
            "id": "@id",
            "title": "@ctitle(2,4)",
            "img": "@image(80x80,@color)",
            // "comment|1-1000": 1,
            // "price|1-1000": 1,
        }]
    }]
})